﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace CodeSnippetsEditor
{
    public partial class frmInputDialog : Form
    {
        #region Kontruktory

        /// <summary>
        /// Initializes a new instance of the <see cref="frmInputDialog"/> class.
        /// </summary>
        public frmInputDialog()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="frmInputDialog"/> class.
        /// </summary>
        /// <param name="title">The title.</param>
        public frmInputDialog(string title)
        {
            InitializeComponent();
            
            Title = title;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="frmInputDialog"/> class.
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="value">The value.</param>
        public frmInputDialog(string title, string value)
        {
            InitializeComponent();
            
            Title = title;
            Value = value;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="frmInputDialog"/> class.
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="value">The value.</param>
        /// <param name="caption">The caption.</param>
        public frmInputDialog(string title, string value, string caption)
        {
            InitializeComponent();
            
            Title = title;
            Value = value;
            Caption = caption;
        }

        #endregion


        #region Vlastnosti

        /// <summary>
        /// Gets or sets the title.
        /// </summary>
        /// <value>The title.</value>
        public string Title
        {
            get
            {
                return lblTitle.Text;
            }
            set
            {
                lblTitle.Text = value;
            }
        }

        /// <summary>
        /// Gets or sets the value.
        /// </summary>
        /// <value>The value.</value>
        public string Value
        {
            get 
            {
                return txtData.Text;
            }
            set
            {
                txtData.Text = value;
            }
        }

        /// <summary>
        /// Gets or sets the caption.
        /// </summary>
        /// <value>The caption.</value>
        public string Caption
        {
            get
            {
                return this.Text;
            }
            set
            {
                this.Text = value;
            }
        }

        #endregion
    }
}
